package com.google.code.sip.ucenter.benchmark;

public final class BenchmarkUtils {

	public static void printResult(int threads, int repeats, int countMax,
			long duration) {
		long av = duration / (threads * repeats * countMax);
		StringBuffer sb = new StringBuffer();
		sb.append("总线程数=").append(threads);
		sb.append(",");
		sb.append("每线程内重复次数=").append(repeats);
		sb.append(",");
		sb.append("每次记录总数=").append(countMax);
		sb.append(",");
		sb.append("总耗时=").append(duration).append("纳秒").append("(").append(
				duration / 1000000).append("毫秒").append(")");
		sb.append(",");
		sb.append("平均每次耗时=").append(av).append("纳秒").append("(").append(
				new Float(av) / 1000000).append("毫秒").append(")");
		System.out.println(sb);
	}

}
